package com.wendyxie.sproutup.view

import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import com.wendyxie.sproutup.R
import com.wendyxie.sproutup.databinding.FragmentFirstBinding
import com.wendyxie.sproutup.db.SQLInitHelper
import com.wendyxie.sproutup.db.SQLUserHelper
import com.wendyxie.sproutup.db.SQLUserScoreRecordHelper
import com.wendyxie.sproutup.entity.UserScoreRecordEntity
import com.wendyxie.sproutup.entity.UserScoreTmplEntity
import com.wendyxie.sproutup.enum.ScoreStatusEnum
import com.wendyxie.sproutup.utils.SPUtil

/**
 * A simple [Fragment] subclass as the default destination in the navigation.
 */
class FirstFragment : Fragment() {

    private var _binding: FragmentFirstBinding? = null
    private var waterNumList = mutableListOf<UserScoreRecordEntity>()

    // This property is only valid between onCreateView and
    // onDestroyView.
    private val binding get() = _binding!!

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
        _binding = FragmentFirstBinding.inflate(inflater, container, false)
        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
    }

    override fun onDestroyView() {
        super.onDestroyView()
        _binding = null
    }
}
